package org.rency.ues.engine.repository.impl;

import org.rency.ues.common.enums.TicketKind;
import org.rency.ues.dal.dao.UesSequenceDao;
import org.rency.ues.engine.repository.UesSequenceRepository;

/**
 * ${todo}
 *
 * @author: Created by user_rcy@163.com on 2016/07/31.
 * @version: V1.0.0
 * @since JDK 1.8
 */
public class UesSequenceRepositoryImpl implements UesSequenceRepository {

    private UesSequenceDao uesSequenceDao;

    @Override
    public Long getSerialSequence() {
        return uesSequenceDao.getSerialSequence();
    }

    @Override
    public String getTicketSequence(TicketKind ticketKind) {
        return ticketKind.getCode()+uesSequenceDao.getTicketSequence(ticketKind.getSeqName());
    }

    public void setUesSequenceDao(UesSequenceDao uesSequenceDao) {
        this.uesSequenceDao = uesSequenceDao;
    }
}
